﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;

namespace VPLink2013.Framework
{
	public class CacheExpiration
	{
		[XmlElement( "WidgetRerExp" )]
		public int WidgetRer { get; set; }
		
        [XmlElement( "WidgetMeteoExp" )]
		public int WidgetMeteo { get; set; }
	}

	public class ConnectionConfig
	{
		[XmlAttribute( AttributeName = "proxy" )]
		public string IsProxy { get ; set; }
		
        [XmlAttribute( AttributeName = "address" )]
		public string proxyAddress { get; set; }
		
        [XmlAttribute( AttributeName = "login" )]
		public string login { get; set; }
		
        [XmlAttribute( AttributeName = "pwd" )]
		public string pwd { get; set; }
		
        [XmlAttribute( AttributeName = "domain" )]
		public string domain { get; set; }
	}
	
	
	public class WSMeteo
	{
		[XmlAttribute( AttributeName = "url" )]
		public string url { get; set; }
		
        [XmlAttribute( AttributeName = "lon" )]
		public string longitude { get; set; }
		
        [XmlAttribute( AttributeName = "lat" )]
		public string latitude { get; set; }
		
        [XmlAttribute( AttributeName = "lang" )]
		public string langue { get; set; }
		
        [XmlAttribute( AttributeName = "units" )]
		public string unite { get; set; }
		
        [XmlAttribute( AttributeName = "mode" )]
		public string mode { get; set; }
	}
	public class WSRerAlertInfo
	{
		[XmlAttribute]
		public string url { get; set; }
		
        [XmlAttribute]
		public string xpathInfo { get; set; }
		
        [XmlAttribute]
		public string xpathDetailInfo { get; set; }
	}

	public class WSRerD
	{
		[XmlAttribute]
		public string url { get; set; }
		
        [XmlAttribute]
		public string xpath { get; set; }
	}
	public class WSRerB
	{
		[XmlAttribute]
		public string url { get; set; }
		
        [XmlAttribute]
		public string xpath { get; set; }
	}
	public class WebServices
	{
		[XmlElement( "meteo" )]
		public WSMeteo meteo { get; set; }
		
        [XmlElement( "rerInfo" )]
		public WSRerAlertInfo alertInfo { get; set; }
		
        [XmlElement( "rerD" )]
		public WSRerD rerD { get; set; }
		
        [XmlElement( "rerB" )]
		public WSRerB rerB { get; set; }
	}

	[XmlRoot( "ConfigWidget" ), XmlType( "ConfigWidget" )]
	public class ConfigWidget
	{
		[XmlElement( "ConnectionConfig" )]
		public ConnectionConfig ConnectionConfig { get; set; }
		
        [XmlElement( "CacheExpiration" )]
		public CacheExpiration CacheExpiration { get; set; }
		
        [XmlElement( "WebServices" )]
		public WebServices WebServices { get; set; }
	}
}
